<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>七十佳护首页</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../css/mui.min.css">
		<link href="../css/app.css" rel="stylesheet" type="text/css">
		<link rel="stylesheet" href="../css/main.css" />
		<link rel="stylesheet" href="../css/scroll_style.css" />
		<link rel="stylesheet" href="../css/bootstrap.min.css">
		<link rel="stylesheet" href="../css/lunbo.css" />
		<link rel="stylesheet" href="../css/animate/rob_order.css" />
		<script src="../js/jquery-3.1.1.min.js"></script>
		<link rel="stylesheet" href="../css/animate/animate.css" />
		<script src="../js/bootstrap.min.js"></script>
		<style>
			.mui-grid-view.mui-grid-9 {
				margin: 0;
				padding-top: 40px;
				border: 0;
				background: none;
				margin-left: 0.5rem;
				padding-left: 10px;
				padding-right: 10px;
			}
			
			html {
				font-size: 100%;
				background-color: #ffffff;
			}
			
			body {
				background-color: #ffffff;
			}
			
			.mui-grid-view.mui-grid-9 .mui-table-view-cell {
				margin: 0;
				border: 0;
			}
			
			.mui-table-view-cell {
				padding: 0px 0px;
			}
			
			.fuwucategory {
				margin: 10px 20px !important;
			}
			
			.mui-table-view-cell.mui-active,
			.mui-table-view-cell>a:not(.mui-btn).mui-active {
				background-color: #FFFFFF;
			}
			
			.mui-table-view-cell:after {
				left: 0;
			}
			
			.mui-table-view-cell.mui-collapse .mui-collapse-content>.mui-input-group,
			.mui-table-view-cell.mui-collapse .mui-collapse-content>.mui-slider {
				margin: 0px -15px;
			}
			
			.anniu {
				background: url(../images/main_bg.png) no-repeat;
				background-size: 110% 5.5rem;
				background-size: 110% 60vh;
				width: 100%;
				height: 5.5rem;
				height: 60vh;
				z-index: 0;
				margin-top: -45px;
				position: absolute;
				top: 4.3rem;
			}
			
			body {
				background: none;
			}
			
			.mui-slider {
				z-index: 0;
			}
			
			.mui-content {
				background: none;
			}
			
			.mui-slider-indicator {
				position: absolute;
				bottom: 45px;
				left: 0px;
				width: 100%;
				text-align: center;
				background: 0 0;
			}
			
			.lefttop1 img,
			.lefttop2 img,
			.righttop1 img,
			.righttop2 img,
			.center2 img,
			.center3 img {
				max-width: 1rem;
				text-align: center;
			}
			
			.center1 img {
				max-width: 3.1rem;
				text-align: center;
			}
			
			.lefttop1,
			.lefttop2,
			.righttop1,
			.righttop2,
			.center2,
			.center3,
			.center1 {
				text-align: center;
			}
			
			.lefttop1 {
				position: absolute;
				top: 1.42rem;
				left: 0.26rem;
			}
			
			.center1 {
				position: absolute;
				top: 0.27rem;
				left: 2.07rem;
			}
			
			.lefttop2 {
				position: absolute;
				top: 3.2rem;
				left: 0.8rem;
			}
			
			.righttop1 {
				position: absolute;
				top: 1.42rem;
				right: 0.26rem;
			}
			
			.center2 {
				position: absolute;
				top: 4.1rem;
				left: 2.2rem;
			}
			
			.center3 {
				position: absolute;
				top: 4.1rem;
				right: 2.2rem;
			}
			
			.righttop2 {
				position: absolute;
				top: 3.2rem;
				right: 0.8rem;
			}
			
			#myCarousel {
				z-index: -99;
			}
			
			.mui-badge {
				font-size: 10px;
				line-height: 1;
				display: inline-block;
				padding: 4px 0px;
				color: #333;
				border-radius: 8px;
				border: 1px solid #DFDFDF;
				background-color: #FFFFFF;
				width: 55px;
				position: absolute;
				left: 0;
				top: 0;
				z-index: 999;
				margin-top: 10px;
			}
			
			.mui-badge-huise {
				color: #333;
				border: 1px solid #DFDFDF;
				background-color: #FFFFFF;
				width: 40px;
				text-align: center;
				margin-left: 0;
				margin-left: 10px;
				opacity: 0.5;
				height: 20px;
			}
			
			.lunbo_gonggao {
				position: absolute;
				bottom: 10px;
			}
			
			.guanbi {
				/*margin-top: 0.25rem;*/
				float: right;
			}
			
			.mui-icon {
				font-size: 2em !important;
				color: #d68a47;
				max-width: 90%;
			}
			
			a {
				color: #d68a47;
			}
			
			a:visited {
				color: #d68a47;
			}
			
			.mui-slider {
				max-height: 4.2rem;
			}
			
			.hide_img {
				position: absolute;
				z-index: 999;
				right: 0;
				top: 3.2rem;
			}
			
			.mui-grid-view.mui-grid-9 .mui-table-view-cell {
				padding: 8px 15px;
			}
			
			.mui-grid-view.mui-grid-9 .mui-table-view-cell.mui-active {
				background-color: transparent;
			}
			
			.active_img {
				position: absolute;
				top: 0.9rem;
				right: 0px;
			}
			
			.gray {
				opacity: 0.4;
				filter: alpha(opacity=40);
			}
			
			.displayNon {
				display: none;
			}
			
			.displayYes {
				display: block;
			}
			
			.mui-media-body {
				font-size: 12px;
				margin-top: 0.05rem;
				margin-left: 0.1rem;
			}
			
			.youhui_active {
				position: absolute;
				top: 1.8rem;
				right: 1.8rem;
				z-index: 999;
				width: 1.27rem;
			}
		</style>
	</head>

	<body style="overflow:scroll;overflow-x:hidden">
		<div class="mui-content">
			<div id="lunbo" style="height: 0.2rem;">

			</div>

			<!--右边划出便利贴-->
			<div id="hide_img" class="hide_img animated fadeInRight">
				<img src="../images/rob_img/tjff.png" style="max-width: 2.11rem;">
			</div>

			<!--弹出推荐服务项目-->
			<div id="rob_order" class="bo-ri">
				<!--<div class="top-order-right" id="close_x">
					<img src="../images/rob_img/sc.png" style="max-width: 0.75rem;" />
				</div>-->

				<!--<ul id="UL_TABLE" class="mui-table-view mui-grid-view mui-grid-9" style="width: 85%;">
					<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4 ">
						<a href="#">
							<span class="mui-icon gray" id="item_img"><img src="../images/rob_img/item1.png"></span>
							<span class="active_img" id="active_img"><img src="../images/rob_img/duihao.png" style="width: 0.3rem;"></span>
							<div class="mui-media-body">骨折术后居家康复</div>
						</a>
					</li>
					<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4 ">
						<a href="#">
							<span class="mui-icon"><img src="../images/rob_img/item2.png"></span>
							<div class="mui-media-body">脊柱康复</div>
						</a>
					</li>
					<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4 ">
						<a href="#">
							<span class="mui-icon"><img src="../images/rob_img/item3.png"></span>
							<div class="mui-media-body">肩部推拿（肩周炎）</div>
						</a>
					</li>
					<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
						<a href="#">
							<span class="mui-icon"><img src="../images/rob_img/item4.png"></span>
							<div class="mui-media-body">颈部推拿（颈椎病、落枕等)</div>
						</a>
					</li>
					<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
						<a href="#">
							<span class="mui-icon"><img src="../images/rob_img/item5.png"></span>
							<div class="mui-media-body">颈椎病，腰突居家护理</div>
						</a>
					</li>
					<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4">
						<a href="#">
							<span class="mui-icon"></span>
							<div class="mui-media-body"></div>
						</a>
					</li>
				</ul>
				<div class="mui-content-padded" style="text-align: center; margin-left: 25px; width: 86%; position: absolute; bottom: 20px;">
					<img src="../images/rob_img/hyh.png" width="20px" height="20px" style="margin-right: 10px;">换一换
				</div>-->

			</div>

			<div class="anniu">
				<!--优惠券图片-->
				<!--<div class="youhui_active" id="youhui_active"><img src="../images/index_img/hbb.gif"></div>-->

				<div class="lefttop1" id="item1_huli">
					<span class="mui-icon"><img src="../images/index_img/smhl.png"></span>
					<div class="mui-media-body">上门护理</div>
				</div>
				<div class=" center1" id="xiaoqi_kefu">
					<span class="mui-icon"><img src="../images/index_img/mainxiaoqi.gif"></span>
					<div class="mui-media-body"></div>
				</div>
				<div class="righttop1" id="wode_healthness">
					<span class="mui-icon"><img src="../images/index_img/main_button3.png"></span>
					<!--<div class="mui-media-body">我的化验单</div>-->
					<div class="mui-media-body">健康数据</div>
				</div>
				<div class="center2" id="item2_zonghe"><span class="mui-icon"><img src="../images/index_img/main_button5.png"></span>
					<div class="mui-media-body">综合服务</div>
				</div>
				<div class="center3" id="report_online"><span class="mui-icon"><img src="../images/index_img/main_button7.png"></span>
					<div class="mui-media-body">报告解读</div>
				</div>
				<div class="lefttop2" id="item1_kangfu"><span class="mui-icon"><img src="../images/index_img/main_button6.png"></span>
					<div class="mui-media-body">上门康复</div>
				</div>
				<div class="righttop2" id="familydoctor"><span class="mui-icon"><img src="../images/index_img/main_button4.png"></span>
					<!--<div class="mui-media-body">我的健康</div>-->
					<div class="mui-media-body">家庭医生</div>
				</div>
			</div>

			<div class="huadong" id="huadong">
				<div class="notice_active mui-row" id="huadong_UL">

				</div>
			</div>
		</div>

	</body>
	<script src="../js/mui.min.js"></script>
	<script type="text/javascript" src="../js/xiangyingshi.js"></script>
	<script type="text/javascript" src="../js/jquery-3.1.1.js"></script>
	<script type="text/javascript" src="../js/scroll.js"></script>
	<script type="text/javascript" src="../js/constants.js"></script>

	<script type="text/javascript" src="../plugs/moment/moment.min.js"></script>
	<script type="text/javascript" src="../js/json_time.js"></script>
	<script type="text/javascript" src="../js/art/template-web.js"></script>
	<script type="text/javascript" src="../js/qs/qs.art.extend.js"></script>
	<script type="text/javascript" src="../js/qs/qs.template.js"></script>

	<script type="text/javascript" src="../js/qs/md5/md5.min.js"></script>
	<script type="text/javascript" src="../js/qs/qs.feedback.js"></script>

	<script>
		mui.init({
			swipeBack: true //启用右滑关闭功能
		});
		var fenlei_nickname = null;
		var fenlei_name_id = null;
		var fenlei_typename = null;

		function hide_youhui_active() {
			if($("#youhui_active")){
				$("#youhui_active").hide();
			}
		}
		mui.plusReady(function() {
			//			if(plus.os.name=="iOS"&&localStorage.getItem("TOKEN")=="13364306255"){
			//				$("#item1_kangfu").hide();
			//			}
			//plus.storage.clear();

			//小柒客户按钮可以点击
			//$("#xiaoqi_kefu").bind("click");
			var xiaoqi_url = serverAddress + "/api/commerical/app/list?type=xq";
			var success_xiaoqi = function(data) {
				console.log("33333xiaoqi" + JSON.stringify(data));
				var value = data.data;

				if(data.result == "success") {
					setTimeout(function() {
						$(".anniu").processTL(templateRegister.youhuijuan, {
							sub: value
						}, 'append', function() {
							$(".qs-img-lazyload").each(function(i, v) {
								$$.lazyload(v)
							})
							var youhuijuan_read = plus.storage.getItem('youhuijuan_read') ? plus.storage.getItem('youhuijuan_read') : null;

							if(youhuijuan_read == "read") {
								hide_youhui_active();
							}
						});
					}, 150);
					//修改优惠券红点展示
					//小柒客户按钮不可以点击
					//$("#xiaoqi_kefu").unbind("click");

					mui(".anniu").on("tap", "#youhui_active", function(e) {
						var forwardtype = $(this).attr("data-forward");
						var extras = $(this).attr("data-ext");
						var def = dataConfig_imglunbo["MSG001"];
						if(forwardtype == "1") {
							mui.openWindow({
								url: def.link,
								id: def.link,
								extras: {
									TAB: extras
								},
								show: {
									autoShow: true, //页面loaded事件发生后自动显示，默认为true
									event: 'loaded'
								},
								waiting: {
									autoShow: true, //自动显示等待框，默认为true
								}
							});
						}
					})

				}
			}
			commonHttpUtilsLUNBO(xiaoqi_url, "get", {}, success_xiaoqi, error, true);

			$("#xiaoqi_kefu").bind("click",function(e) {
				mui.openWindow({
					id: 'xqzx_auto.html',
					url: '../geren_message/xqzx/xqzx_auto.html',
					show: {
						autoShow: false, //页面loaded事件发生后自动显示，默认为true
						event: 'loaded' //页面显示时机，默认为titleUpdate事件时显示
					},
					waiting: {
						autoShow: false //自动显示等待框，默认为true
					},
					extras: {
						biaoshi: "zhengchang" //在下单时做个标识，如果是"zhengchang"就是正常下单，"yihu"就是选择医护下单
					}
				});
			})
			//弹出推荐服务项目
			//setTimeout(floatWebview(), 8000);
			$("#rob_order").hide();
			$("#rob_order").click(function(e) {
				$("#rob_order").fadeOut();
				$("#hide_img").show();
				$("#hide_img").fadeIn().animate({
					opacity: 0.25,
					'right': '+=160',
				}, 1000, function() {
					// Animation complete.
				});
			});

			if(localStorage.getItem("TOKENID") == null) {
				$("#hide_img").hide();

			} else {
				$("#hide_img").show();
				var tuijian_item_url = serverAddress + "/api/item/spreadclass";
				var success = function(data) {
					console.log("tuijianxiangmu" + JSON.stringify(data));
					var type = data.type;
					var value = data.data;

					$("#rob_order").html("");

					if(data.result == "success") {
						$("#rob_order").processTL(templateRegister.tuijian_item, {
							sub: value,
							type: type
						}, 'prepend', function() {

							$(".qs-img-lazyload").each(function(i, v) {
								$$.lazyload(v)
							})
						});
					}
				}
				commonHttpUtils(tuijian_item_url, "get", {}, success, error, true);
			}

			mui("#rob_order").on("tap", "a", function(e) {
				var tuijian_type = $(this).attr("data_type");
				/*tuijian_type为item时，为扫码注册，tuijian_type为class时，为自然注册*/
				if(tuijian_type == "item") {
					var item_name_xiangqing = $(this).attr("data_name");
					var item_name_id = this.id;
					mui.openWindow({
						id: 'a015_item_xiangqing.html',
						url: '../order/a015_item_xiangqing.html',
						show: {
							autoShow: false, //页面loaded事件发生后自动显示，默认为true
							event: 'loaded' //页面显示时机，默认为titleUpdate事件时显示
						},
						waiting: {
							autoShow: false //自动显示等待框，默认为true
						},
						extras: {
							biaoshi: "zhengchang" //在下单时做个标识，如果是"zhengchang"就是正常下单，"yihu"就是选择医护下单
						}
					});
					var sevice_item_xiangqing = plus.webview.getWebviewById('a015_item_xiangqing.html');
					sevice_item_xiangqing.addEventListener('loaded', function() {
						mui.fire(sevice_item_xiangqing, "sevice_item_xiangqing", {
							ITEM_NAME: item_name_xiangqing,
							ITEM_NAME_ID: item_name_id
						});
					});
				} else if(tuijian_type == "class") {

					var lis = Array.prototype.slice.call(document.getElementById('UL_TABLE').getElementsByTagName('li'));
					var len = lis.length;
					var activeLen = document.querySelectorAll('.gray').length;

					if($(this).find("#item_img").hasClass("gray") && $(this).find("#active_img").hasClass("displayNon")) {
						$(this).find("#item_img").removeClass("gray");
						$(this).find("#active_img").removeClass("displayNon");
						$(this).find("#active_img").addClass("displayYes");

					} else {
						if(!activeLen) {
							$(this).find("#item_img").addClass("gray");
							$(this).find("#active_img").toggleClass("displayNon", "displayYes");
						} else {
							lis.forEach(function(item) {
								$(item).find("#item_img").removeClass("gray");
								$(item).find("#active_img").removeClass("displayYes");
								$(item).find("#active_img").addClass("displayNon");
							})
							$(this).find("#item_img").addClass("gray");
							$(this).find("#active_img").removeClass("displayNon");
							$(this).find("#active_img").addClass("displayYes");
						}
					}
					fenlei_nickname = $(this).attr("data_name");
					fenlei_name_id = this.id;
					fenlei_typename = $(this).attr("data_typename");

				}
			});
			//分类确认按钮
			mui("#rob_order").on("tap", "button", function(e) {
				if(fenlei_name_id == "") {
					mui.toast("请选择分类");
					return false;
				}
				var tijiao_url = serverAddress + "/api/patient/setspreadclass";
				var success = function(data) {
					console.log(JSON.stringify(data));

					if(data.result == "success") {
						$("#rob_order").fadeOut();
						$("#hide_img").show();
						$("#hide_img").fadeIn().animate({
							opacity: 0.25,
							'right': '+=160',
						}, 1000, function() {
							// Animation complete.
						});

						var tuijian_item_url = serverAddress + "/api/item/spreadclass";
						var success2 = function(data) {
							console.log("tuijianxiangmu" + JSON.stringify(data));
							var type = data.type;
							var value = data.data;
							$("#rob_order").html("");
							if(data.result == "success") {
								$("#rob_order").processTL(templateRegister.tuijian_item, {
									sub: value,
									type: type
								}, 'prepend', function() {

									$(".qs-img-lazyload").each(function(i, v) {
										$$.lazyload(v)
									})
								});
							}

						}
						commonHttpUtils(tuijian_item_url, "get", {}, success2, error, true);
					}
				}
				commonHttpUtils(tijiao_url, "POST", {
					nickname: fenlei_nickname,
					typename: fenlei_typename
				}, success, error, true);

			});

			$("#hide_img").click(function() {
				$(this).animate({
					'right': -160
				}, 'slow', function() {
					//animate回调函数，首先距离移动图片，距离左边界150px，此时在右边界处了。在移动至贴近左边界。  
					$(this).hide();
					$("#rob_order").fadeIn();

				});
			});

			$(".anniu>div").filter('[id*="item"]').click(function(e) {
				mui.openWindow({
					id: 'service_item.html',
					url: '../order/service_item.html',
					show: {
						autoShow: false, //页面loaded事件发生后自动显示，默认为true
						event: 'loaded' //页面显示时机，默认为titleUpdate事件时显示
					},
					waiting: {
						autoShow: false //自动显示等待框，默认为true
					}
				});
				var sevice_item_message = plus.webview.getWebviewById('service_item.html');
				if($(this).attr("id").indexOf("item1") >= 0) {

					if($(this).attr("id").indexOf("kangfu") >= 0) {
						sevice_item_message.addEventListener('loaded', function() {
							mui.fire(sevice_item_message, "sevice_item_message", {
								item_name: "上门康复"
							});
						});
					} else if($(this).attr("id").indexOf("huli") >= 0) {
						sevice_item_message.addEventListener('loaded', function() {
							mui.fire(sevice_item_message, "sevice_item_message", {
								item_name: "上门护理"
							});
						});
					}
				}
				if($(this).attr("id").indexOf("item2") >= 0) {
					sevice_item_message.addEventListener('loaded', function() {
						mui.fire(sevice_item_message, "sevice_item_message", {
							item_name: "综合服务"
						});
					});
				}
			});
			$("#familydoctor").click(function(e) {
				if(localStorage.getItem("TOKENID") == null) {
					mui.openWindow({
						url: "../login/login.html"
					});
					return false;
				}

				var id = localStorage.getItem("TOKENID");
				if(id == null) {
					var self = plus.webview.currentWebview();
					id = self.USER_ID;
				}
				mui.openWindow({
					id: 'familydoctor.html',
					url: '../familydoctor/familydoctor.html',
					show: {
						autoShow: false, //页面loaded事件发生后自动显示，默认为true
						event: 'loaded' //页面显示时机，默认为titleUpdate事件时显示
					},
					waiting: {
						autoShow: false //自动显示等待框，默认为true
					}
				});
			});

			$("#report_online").click(function(e) {
				if(localStorage.getItem("TOKENID") == null) {
					mui.openWindow({
						url: "../login/login.html"
					});
					return false;
				}
				//设置报告解读页面样式
				var titleNView = {
					backgroundColor: '#45d0d5', //导航栏背景色
					titleColor: '#FFFFFF',
					type: 'transparent', //透明渐变样式
					autoBackButton: true, //自动绘制返回箭头

				}
				mui.openWindow({
					url: "../online_answer_order/online_answer_index.html",
					id: "online_answer_index.html",
					styles: {
						//titleNView: titleNView
					}
				});

			});

			$("#wodehuayandan").click(function(e) {
				mui.openWindow({
					id: 'fuyao_notice.html',
					url: '../geren_message/fuyao_notice.html',
					show: {
						autoShow: false, //页面loaded事件发生后自动显示，默认为true
						event: 'loaded' //页面显示时机，默认为titleUpdate事件时显示
					},
					waiting: {
						autoShow: false //自动显示等待框，默认为true
					}
				});
				//mui.toast("正在建设中......");
			});
			$("#wode_healthness").click(function(e) {

				if(localStorage.getItem("TOKENID") == null) {
					mui.openWindow({
						url: "../login/login.html"
					});
					return false;
				}

				mui.openWindow({
					id: 'echarts.html',
					url: '../familydoctor/echarts.html',
					show: {
						autoShow: false, //页面loaded事件发生后自动显示，默认为true
						event: 'loaded' //页面显示时机，默认为titleUpdate事件时显示
					},
					waiting: {
						autoShow: false //自动显示等待框，默认为true
					}
				});
				//mui.toast("正在建设中......");
			});

			mui("#huadong_UL").on("tap", ".guanbi", function() {
				$("#huadong").hide();
			});
			//获取服务器端广告位图片
			//type(ggw：广告位、sp：闪屏、xq：小七)

			var lunbo_url = serverAddress + "/api/commerical/app/list?type=ggw";
			var html = '<div id="slider" class="mui-slider"><div class="mui-slider-group mui-slider-loop"><!--额外增加的一个节点(循环轮播：第一个节点是最后一张轮播)--><div class="mui-slider-item mui-slider-item-duplicate"><a href="#"><img src="../images/banner2.png"></a></div><!--第一张--><div class="mui-slider-item"><a href="#"><img src="../images/banner2.png"></a></div><!--第二张--><div class="mui-slider-item"><a href="#"><img src="../images/banner3.jpg"></a></div><!--第三张--><div class="mui-slider-item"><a href="#"><img src="../images/banner4.png"></a></div><!--第四张--><div class="mui-slider-item"><a href="#"><img src="../images/banner5.png"></a></div><div class="mui-slider-item"><a href="#"><img src="../images/banner5.png"></a></div><!--额外增加的一个节点(循环轮播：最后一个节点是第一张轮播)--><div class="mui-slider-item mui-slider-item-duplicate"><a href="#"><img src="../images/advert/banner.jpg"></a></div></div><div class="mui-slider-indicator"><div class="mui-indicator mui-active"></div><div class="mui-indicator"></div><div class="mui-indicator"></div><div class="mui-indicator"></div><div class="mui-indicator"></div></div></div>'

			setTimeout(function() {
				$("#lunbo").html(html);
			}, 150);

			var success = function(data) {
				//console.log("33333" + JSON.stringify(data));
				var value = data.data;
				if(value) {
					setTimeout(function() {
						$("#lunbo").html("");
					}, 150);
				}
				if(data.result == "success") {
					setTimeout(function() {
						$("body").processTL(templateRegister.lunbo_main, {
							sub: value
						}, 'prepend', function() {
							var slider = mui("#slider");
							slider.slider({
								interval: 5000
							});
							$(".qs-img-lazyload").each(function(i, v) {
								$$.lazyload(v)
							})
						});
					}, 150);

					mui("body").on("tap", ".mui-slider-item", function() {
						var forwardtype = $(this).attr("data-forward");
						var extras = $(this).attr("data-ext");
						var def = dataConfig_imglunbo["MSG001"];
						if(forwardtype == "1") {
							mui.openWindow({
								url: def.link,
								id: def.link,
								extras: {
									TAB: extras
								},
								show: {
									autoShow: true, //页面loaded事件发生后自动显示，默认为true
									event: 'loaded'
								},
								waiting: {
									autoShow: true, //自动显示等待框，默认为true
								}
							});
						}
					});
				}

			}
			commonHttpUtilsLUNBO(lunbo_url, "get", {}, success, error, true);

			//获取公告轮播数据

			var gonggao_url = serverAddress + "/api/patient/getneworder";
			$("#huadong").hide();
			var success = function(data) {
				if(data) {
					$("#huadong").show();
				}
				if(data.result == "success") {
					$("#huadong_UL").processTL(templateRegister.huadong_main, {
						sub: data.data
					}, 'append', function() {

						//获取当前时间的小时数
						var frequency = 3500;
						var current_hour = parseInt(moment().hour());
						if(21 <= current_hour && current_hour <= 24 || 1 <= current_hour && current_hour <= 5) {
							frequency = 60000;
						} else {
							frequency = 3500;
						}

						//公告上下轮播

						var num = $('.notice_active').find('li').length;
						if(num > 1) {
							var time = setInterval('timer(".notice_active")', frequency);
							$('.gg_more a').mousemove(function() {
								clearInterval(time);
							}).mouseout(function() {
								time = setInterval('timer(".notice_active")', frequency);
							});
						}
					});
				}
			};
			commonHttpUtilsLUNBO(gonggao_url, "get", {}, success, error, true);
			setTimeout(function(e) {
				commonHttpUtilsLUNBO(gonggao_url, "get", {}, success, error, true);
			}, 120000);

		});

		function timer(opj) {
			$(opj).find('ul').animate({
				marginTop: "-7rem"
			}, 0, function() {
				$(this).css({
					marginTop: "0.15rem"
				}).find("li:first").appendTo(this);
			})
		}
		var floatw = null;

		function floatWebview() {
			if(floatw) { // 避免快速多次点击创建多个窗口
				return;
			}

			floatw = plus.webview.create("../order/rob_order.html", "rob_order.html", {
				width: '100%',
				height: '51%',
				margin: "auto",
				//				background: "rgba(0,0,0,0.4)",
				scrollIndicator: 'vertical',
				scalable: false,
				popGesture: 'none'
			});
			floatw.addEventListener("loaded", function() {
				floatw.show('slide-in-right', 300);
				floatw = null;
			}, false);
		}

		//		{
		//			"result": "success",
		//			"data": [{
		//				"status": "0",
		//				"forwardtype": "1",
		//				"type": "0",
		//				"createdOn": "2018-04-11T06:01:07.424Z",
		//				"_id": "5acda4a39ef16f043cabea5c",
		//				"name": "2",
		//				"indexnumber": 1,
		//				"starttime": "2018-03-05T16:00:00.000Z",
		//				"stoptime": "2018-04-30T16:00:00.000Z",
		//				"img": "\\assets\\uploads\\single-file-1523426393815.jpg"
		//			}, {
		//				"status": "0",
		//				"forwardtype": "0",
		//				"type": "0",
		//				"createdOn": "2018-03-07T01:22:44.038Z",
		//				"_id": "5a9f3ee49b79823ae8df24b1",
		//				"name": "1003",
		//				"indexnumber": 3,
		//				"starttime": "2018-03-05T16:00:00.000Z",
		//				"stoptime": "2018-04-30T16:00:00.000Z",
		//				"img": "\\assets\\uploads\\single-file-1520562761201.png",
		//				"__v": 0
		//			}, {
		//				"status": "0",
		//				"forwardtype": "0",
		//				"type": "0",
		//				"createdOn": "2018-03-07T01:23:10.028Z",
		//				"_id": "5a9f3efe9b79823ae8df24b3",
		//				"name": "1004",
		//				"indexnumber": 4,
		//				"starttime": "2018-03-06T16:00:00.000Z",
		//				"stoptime": "2018-11-29T16:00:00.000Z",
		//				"img": "\\assets\\uploads\\single-file-1520562769192.png",
		//				"__v": 0
		//			}]
		//		}
	</script>

</html>